<template>
  <div class="record-container">
    <el-table border :data="recordData" style="width: 100%">
      <el-table-column
        :label="translate('审核节点')"
        min-width="100"
        prop="CurrentNodeName"
      />
      <el-table-column
        :label="translate('审核人员')"
        min-width="100"
        prop="CreateUserName"
      />
      <el-table-column
        :label="translate('审核时间')"
        min-width="150"
        prop="CreateDate"
      />
      <el-table-column :label="translate('审核结果')" min-width="90">
        <template #default="{ row }">
          {{
            row.OperateType === 'start'
              ? translate('发起审核')
              : row.OperateType === 'pass'
              ? translate('通过')
              : row.OperateType === 'back'
              ? translate('退回')
              : row.OperateType === 'refuse'
              ? translate('拒绝')
              : row.OperateType === 'end'
              ? translate('结束')
              : ''
          }}
        </template>
      </el-table-column>
      <el-table-column
        :label="translate('审核意见')"
        min-width="100"
        prop="Content"
      />
    </el-table>
  </div>
</template>

<script lang="ts" setup>
  import { translate } from '@/i18n'
  const props = defineProps({
    recordData: {
      type: Array,
      default: () => {
        return [] as any
      },
    },
  })
</script>

<style lang="scss" scoped></style>
